package com.wolfalpha.lwtool.vo;

import java.io.Serializable;

/**
 * 狼王job实体
 * 
 * @author ttStudio
 * 
 */
public class LWJob implements Serializable {

	private static final long serialVersionUID = -5142140157278748644L;

	private int id; // 兼职信息的id
	private int company; // 发布该兼职信息的企业用户id
	private String name; // 兼职标题
	private int category; // 工作类型
	private String contact; // 公司联系人姓名
	private String tel; // 联系人手机
	private String region; // 地区 id 一二级地区合并
	private String address; // 工作地点
	private int type; // 工作性质
	private int wage; // 工资
	private int wage_type; // 工资类型
	private int payoff; // 结算方式
	private int time; // 工作时间 21个布尔值组成的int型
	private String days; // 截止时间
	private int limit; // 招聘人数
	private String intro; // 工作简介
	private String requirement; // 工作要求
	private int is_closed; // 是否停招 0未停招 1已停招
	private int is_del; // 是否被删除 0未删除 1已删除
	private int is_audited; // 是否被删除 0未删除 1已删除
	private int publish_time; // 发布时间

	/** id:1221,name:faf,saff:sa..... **/
	public LWJob(String cf) {
		if(cf.contains(":null,")){
			cf = cf.replaceAll(":null,", ": \",");
		}
		String tme[] = cf.split("\",\"");
		for (int i = 0; i < tme.length; i++) {
			tme[i] = tme[i].replaceAll("\"\"", "  ");
			tme[i] = tme[i].replaceAll("\"", "");
			System.out.println("haaaaaaaaa: " + tme[i]);
			String v = tme[i].split(":")[0];
			String k = tme[i].split(":")[1];
			if (v.equals("id")) {
				this.id = Integer.parseInt(k);
			} else if (v.equals("company")) {
				this.company = Integer.parseInt(k);
			} else if (v.equals("name")) {
				this.name = k;
			} else if (v.equals("category")) {
				this.category = Integer.parseInt(k);
			} else if (v.equals("contact")) {
				this.contact = k;
			} else if (v.equals("tel")) {
				this.tel = k;
			} else if (v.equals("region")) {
				this.region = k;
			} else if (v.equals("address")) {
				this.address = k;
			} else if (v.equals("type")) {
				this.type = Integer.parseInt(k);
			} else if (v.equals("wage")) {
				this.wage = Integer.parseInt(k);
			} else if (v.equals("wage_type")) {
				this.wage_type = Integer.parseInt(k);
			} else if (v.equals("payoff")) {
				this.payoff = Integer.parseInt(k);
			} else if (v.equals("time")) {
				this.time = Integer.parseInt(k);
			} else if (v.equals("days")) {
				this.days = k;
			} else if (v.equals("limit")) {
				this.limit = Integer.parseInt(k);
			} else if (v.equals("intro")) {
				this.intro = k;
			} else if (v.equals("requirement")) {
				this.requirement = k;
			} else if (v.equals("is_closed")) {
				this.is_closed = Integer.parseInt(k);
			} else if (v.equals("is_del")) {
				this.is_del = Integer.parseInt(k);
			} else if (v.equals("publish_time")) {
				this.publish_time = Integer.parseInt(k);
			} else if (v.equals("is_audited")) {
				this.is_audited = Integer.parseInt(k);
			}
		}
	}

	@Override
	public String toString() {
		return "LWJob [id=" + id + ", company=" + company + ", name=" + name
				+ ", category=" + category + ", contact=" + contact + ", tel="
				+ tel + ", region=" + region + ", address=" + address
				+ ", type=" + type + ", wage=" + wage + ", wage_type="
				+ wage_type + ", payoff=" + payoff + ", time=" + time
				+ ", days=" + days + ", limit=" + limit + ", intro=" + intro
				+ ", requirement=" + requirement + ", is_closed=" + is_closed
				+ ", is_del=" + is_del + ", publish_time=" + publish_time + "]";
	}

	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}

	public int getCompany() {
		return company;
	}

	public void setCompany(int company) {
		this.company = company;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getCategory() {
		return category;
	}

	public void setCategory(int category) {
		this.category = category;
	}

	public String getContact() {
		return contact;
	}

	public void setContact(String contact) {
		this.contact = contact;
	}

	public String getTel() {
		return tel;
	}

	public void setTel(String tel) {
		this.tel = tel;
	}

	public String getRegion() {
		return region;
	}

	public void setRegion(String region) {
		this.region = region;
	}

	public String getAddress() {
		return address;
	}

	public void setAddress(String address) {
		this.address = address;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}

	public int getWage() {
		return wage;
	}

	public void setWage(int wage) {
		this.wage = wage;
	}

	public int getWage_type() {
		return wage_type;
	}

	public void setWage_type(int wage_type) {
		this.wage_type = wage_type;
	}

	public int getPayoff() {
		return payoff;
	}

	public void setPayoff(int payoff) {
		this.payoff = payoff;
	}

	public int getTime() {
		return time;
	}

	public void setTime(int time) {
		this.time = time;
	}

	public String getDays() {
		return days;
	}

	public void setDays(String days) {
		this.days = days;
	}

	public String getIntro() {
		return intro;
	}

	public void setIntro(String intro) {
		this.intro = intro;
	}

	public String getRequirement() {
		return requirement;
	}

	public void setRequirement(String requirement) {
		this.requirement = requirement;
	}

	public boolean isIs_closed() {
		return is_closed == 1;
	}

	public boolean isIs_del() {
		return is_del == 1;
	}

	public int getIs_closed() {
		return is_closed;
	}

	public void setIs_closed(int is_closed) {
		this.is_closed = is_closed;
	}

	public int getIs_del() {
		return is_del;
	}

	public void setIs_del(int is_del) {
		this.is_del = is_del;
	}

	public int getLimit() {
		return limit;
	}

	public void setLimit(int limit) {
		this.limit = limit;
	}

	public int getPublish_time() {
		return publish_time;
	}

	public void setPublish_time(int publish_time) {
		this.publish_time = publish_time;
	}

	public int getIs_audited() {
		return is_audited;
	}

	public void setIs_audited(int is_audited) {
		this.is_audited = is_audited;
	}

}
